package com.yq.cns.ui.main.fragment

import android.os.Bundle
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import androidx.fragment.app.Fragment
import com.alibaba.android.arouter.launcher.ARouter
import com.fmt.mvi.learn.gobal.log
import com.yq.cns.R
import com.yq.cns.databinding.FragmentMineBinding
import config.TEST_COMPONENT
import config.TEST_Event_Dispatcher
import config.TEST_SKIN
import config.TanHua_main

/**
 * @author: user
 * @date: 2022/11/17
 */
class MineFragment : Fragment() {
    override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
        super.onViewCreated(view, savedInstanceState)
        "MineFragment 对象$this".log()
        binding.tvTestSkin.setOnClickListener {
            ARouter.getInstance().build(TEST_SKIN).navigation()
        }

        binding.tvTestComponent.setOnClickListener {
            ARouter.getInstance().build(TEST_COMPONENT).navigation()
        }
        binding.tvTestEvent.setOnClickListener {
            ARouter.getInstance().build(TEST_Event_Dispatcher).navigation()
        }
        binding.tvTanHua.setOnClickListener {
            ARouter.getInstance().build(TanHua_main).navigation()
        }


    }

    lateinit var binding: FragmentMineBinding
    override fun onCreateView(
        inflater: LayoutInflater,
        container: ViewGroup?,
        savedInstanceState: Bundle?
    ): View? {
        binding = FragmentMineBinding.inflate(inflater,container,false)
        return binding.root
    }
}